Skip to content

[WRONG BRANCH] fix: enforce native chat effort caps without pins - #469

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-effort-cap-bypass-vulnerability
Draft

[WRONG BRANCH] fix: enforce native chat effort caps without pins#469
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-effort-cap-bypass-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Motivation

  • A native Chat path only applied effort caps when an operator pin resolved, which let qualifying unpinned requests bypass configured hard ceilings and raise upstream inference effort. This change restores the documented hard-ceiling semantics for v2 and spawned-child turns.

Description

  • Evaluate and apply the effort cap independently of whether an operator pinned value resolved by moving cap logic outside the pin-only branch in src/server/chat-native.ts and ensuring wire normalization runs when either a pin or cap changes the effort.
  • Add a normalizeForWire flag so provider wire mapping via mapReasoningEffort happens whenever pinning or capping altered the effective effort, preserving passthrough spelling for unqualified caller values.
  • Update the integration regression in tests/codex-integration/model-pinned-effort.test.ts to assert that a qualifying unpinned spawned-child request is capped (ultra -> low) while an otherwise identical unqualified request still preserves the caller spelling.

Testing

  • Ran bun run typecheck and it passed.
  • Ran bun run privacy:scan and it passed.
  • Ran git diff --check and it passed.
  • Attempted the focused test bun test tests/codex-integration/model-pinned-effort.test.ts but test collection failed in the current environment because the available Bun runtime lacks the node:zlib zstdDecompressSync export; the updated test is included in the PR and will be exercised by CI where the expected Bun runtime is available.

Codex Task

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 902b9f41-c8ec-4ab7-a86c-d5b0c5361efe


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T00:21:46.930173Z 4c7e0ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the bug Something isn't working label Sep 9, 2026
@github-actions github-actions Bot changed the title fix: enforce native chat effort caps without pins [WRONG BRANCH] fix: enforce native chat effort caps without pins Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft September 9, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant